<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%> 
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%
	String basePath = "http://" + request.getLocalAddr() + ":"
			+ request.getLocalPort() + request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<title>${promptInfo.totalDescInfo}</title>
<head>
<script type="text/javascript">
$(document).ready(function(){	
 //input验证
	$.formValidator.initConfig({formid:"actionForm",onerror:function(){alert('校验没有通过，具体错误请看错误提示')},onsuccess:function(){}});//表单提交 
	$("#dtDesc").formValidator({onshow:"请输入字典描述",onfocus:"请输入您的字典描述",oncorrect:"谢谢您的配合"}).inputValidator({min:1,onerror:"字典描述不能为空,请确认"});
	$("#dtName").formValidator({onshow:"请输入字典类型名称",onfocus:"请输入您的字典类型名称",oncorrect:"恭喜你,该名称可用"}).inputValidator({min:1,onerror:"字典类型名称不能为空,请确认"}).ajaxValidator({
		//ajax验证
		type : "get",
		url : "ajaxAction.action",
		datatype : "json",
		data: "code=${pmsIndex.config_dict_type_check.code}",//不用传loginID的值，已经在formValidator.js中自动传值了
		success : function(jsonData){//[JSON]{"data":null,"paginatedData":null,"singleData":0}
			if( jsonData.singleData == "0" )
			{
                return true;
			}
            else
			{
                return false;
			}
		},
		buttons: $("#button"),
		error: function(){alert("服务器没有返回数据，可能服务器忙，请重试");},
		onerror : "该字典类型名称已存在，请更换字典类型名称",
		onwait : "正在对字典类型名称进行合法性校验，请稍候..."
	});
});

</script>
</head>
<body>
<form name="actionForm" method="post" action="operateAction.action" id="actionForm">
<input type="hidden" name="code" value="${code}"> 
<input type="hidden" name="imitateStep" value="${pmsIndex.config_dict_type.imitationStep}"> 
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableC">
	<tr>
		<td class="tableCleft">&nbsp;</td>
		<td class="tableCcenter">
		<table width="100%" border="0" cellpadding="0" cellspacing="1" class="SkyTDLine">
			<tr>
				<td class="SkyTDLine">
				<table class="SkyTDLine" cellSpacing="1" cellPadding="0" width="100%" border="0">
					<tr class="MeNewTDLine" align="center">
						<td align="center">
						<table class="Ntable" cellSpacing="1" cellPadding="0" width="100%" border="0">
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine" width="15%">字典类型名称：</td>
								<td class="SkyTDLine"><input name="paramMap.dtName" type="text" maxlength="20" id="dtName" style="width: 200;"/>&nbsp;<font color="red">*</font><span id="dtNameTip" style="width:250px"></span></td>
							</tr>
							<tr class="MeNewTDLine">
								<td align="right" class="SkyTDLine">字典描述：</td>
								<td class="SkyTDLine"><input name="paramMap.dtDesc" type="text" maxlength="20" id="dtDesc" style="width: 200;"/>&nbsp;<font color="red">*</font><span id="dtDescTip" style="width:250px"></span></td>
							</tr>
							<tr class="MeNewTDLine" align="center">
								<td colSpan="2" class="SkyTDLine"><input type="submit" name="BtnOk" value="创建" id="BtnOk" class="SkyButtonBlur" onMouseOut="this.className='SkyButtonBlur'" onMouseOver="this.className='SkyButtonFocus'" />&nbsp;&nbsp;<input type="button" name="BtnOk" value="返回" id="BtnOk" class="SkyButtonBlur" onMouseOut="this.className='SkyButtonBlur'" onMouseOver="this.className='SkyButtonFocus'" onclick="window.history.back();" /></td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
		<td class="tableCright">&nbsp;</td>
	</tr>
</table>
</form>
</body>
</html>
